﻿namespace block_explorer.NoiseSystem.Nodes
{
    class OffsetScale : INode
    {
        INode mSource;
        double mOffset;
        double mScale;

        public OffsetScale(INode source, double offset, double scale)
        {
            mSource = source;
            mOffset = offset;
            mScale = scale;
        }

        public double Value(double x, double y, double z)
        {
            return mOffset + mScale * mSource.Value(x, y, z);
        }
    }
}
